module.exports = {
    // 网站标题
    title: 'TBlog',
    // 网站描述
    description: 'TBlog with vitePress',
    // 打包目录
    dest: './dist',
    base:'/interview/',
    // 头部head
    head: [
        // 添加图标
        ['link', { rel: 'icon', href: '/favicon.ico' }]
    ],
    // 使用插件
    plugins: [
        '@vuepress/active-header-links',
        '@vuepress/back-to-top',
        '@vuepress/medium-zoom',
        '@vuepress/nprogress',
      [
        '@vuepress/plugin-search',
        {
          locales: {
            '/': {
              placeholder: 'Search',
            },
            '/zh/': {
              placeholder: '搜索',
            },
          },
        },
      ],
    ],
    // 主题配置
    themeConfig: {
        // 获取每个文件最后一次 git 提交的 UNIX 时间戳(ms)，同时它将以合适的日期格式显示在每一页的底部
        // lastUpdated: 'Last Updated', // string | boolean
        // 启动页面丝滑滚动
        smoothScroll: true,
        // 导航栏配置
        nav:[
          {text: 'Music', link: 'http://101.43.7.188:66' },
          {text: 'CMC', link: 'http://101.43.7.188:80' },
          {text: '掘金', link: 'https://juejin.cn/user/2163479676978734/posts'},
          {text: 'Gitee', link: 'https://gitee.com/tu_zhiwei98'}
        ],
        sidebar:{
            '/':getSidebar()
        }
    }
}

  function getSidebar() {
    return [
      {
        text:'Vue3.2X',
        children:[
          { text: '基本语法&使用', link: '/Vue/' },
          { text: 'VueX4.x', link: '/Vue/VueX' },
          { text: 'Router4.x', link: '/Vue/Router' },
          { text: '部分源码解析',
          children:[
            { text: '响应式系统', link: '/Vue/reactive' },
            { text: 'Watch', link: '/Vue/Watch' },
            { text: 'nextTick', link: '/Vue/nextTick' },
          ]},
        ]
      },
      {
        text:'WebPack',
        children:[
          { text: '基础配置', link: '/WebPack/' },
          { text: '优化方案', link: '/WebPack/optimize' },
          { text: '常见的Loader以及Plugin', link: '/WebPack/common' },
          { text: '自定义Loader以及Plugin', link: '/WebPack/custom' },
          { text: '手写简单的MY_Webpack', link: '/WebPack/advanced' },
        ]
      },
        {
          text:'Javascript',
          children:[
            { text: '基本语法', link: '/Javascript/' },
            { text: '高级语法', link: '/Javascript/advanced' },
          ]
        },
        {
          text:'TypeScript',
          children:[
            { text: '基本语法', link: '/TypeScript/' },
            { text: '业务实战', link: '/TypeScript/combat' },
            { text: '高阶使用', link: '/TypeScript/advanced' },
          ]
        },
        {
          text:'浏览器相关',
          children:[
            { text: '基本原理', link: '/Browser/' },
            { text: '浏览器插件', link: '/Browser/plugin' },
            { text: '深入原理', link: '/Browser/advanced' },
          ]
        },
        {
          text:'计算机网络',
          children:[
            { text: '计算机网络', link: '/Network/' },
            { text: '前端安全', link: '/Network/security' },
          ]
        },
        {
          text:'HTML/CSS',
          children: [
              { text: 'CSS', link: '/CSS/' },
              { text: 'HTML', link: '/HTML/' },
          ],
          sidebarDepth:3
      },
      {
        text:'Vite2.X',
        children:[
          { text: '基础配置', link: '/Vite/' },
          { text: '原理以及优化', link: '/Vite/optimize' },
        ]
      },
      {
        text:'Node',
        children:[
          { text: '基本知识', link: '/Node/' },
          { text: '踩坑记录', link: '/Node/pit' },
        ]
      },
      {
        text:'其他前端工具',
        children:[
          { text: 'Git', link: '/Git/' },
          { text: 'Jenkins', link: '/Jenkins/' },
          { text: '包管理工具', link: '/npm/' },
        ]
      },
      {
        text:'踩坑记录以及经验',
        children:[
          { text: '踩坑', link: '/Pit/' },
          { text: '一些解决方案', link: '/solution/' },
        ]
      },
        {
          text:'面经',
          children:[
            { text: 'xxx面试', link: '/Interview/' },
            { text: 'xxX面试', link: '/Interview/two' },
          ]
        },
        {
          text:'个人学习历程',
          children:[
            { text: '个人情况说明', link: '/Myself/' },
            { text: '入行工作前', link: '/Myself/pre' },
            { text: '工作第一年', link: '/Myself/one' },
          ]
        },
    ]
}
  